package com.tbit.main.service.impl;

import com.tbit.main.constant.DaoParamConstant;
import com.tbit.main.dao.stat.MonthDataTypeDao;
import com.tbit.main.pojo.MonthDateType;
import com.tbit.main.service.MonthDateTypeService;
import com.tbit.main.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author LMY
 * @create 2022-04-14 15:11
 * 订单时间类型
 */
@Service("monthDateTypeService")
public class MonthDateTypeServiceImpl implements MonthDateTypeService {

    @Autowired
    private MonthDataTypeDao monthDataTypeDao;

    @Override
    public List<MonthDateType> getByAccountId(List<Integer> accountIds, String startTime, String endTime) {
        Map<String, Object> map = new HashMap<>();
        map.put(DaoParamConstant.accountIds, StringUtil.getListString(accountIds));
        map.put(DaoParamConstant.startTime, startTime);
        map.put(DaoParamConstant.endTime, endTime);
        return monthDataTypeDao.getByAccountId(map);
    }
}
